Use Windows.pkg
Use DFClient.pkg
Use cDbCJGridPromptList.pkg
Use cPatientDataDictionary.dd

Object oPatientSL is a dbModalPanel
    Set Size to 153 395
    Set Location to 7 11
    Set Border_Style to Border_Thick
    Set Label to "Patients"
    
    Object oPATIENT_DD is a cPatientDataDictionary
    End_Object

    Set Main_DD to oPATIENT_DD
    Set Server to oPATIENT_DD

    Object oSelList is a cDbCJGridPromptList
        Set peAnchors to anAll
        Set Size to 125 383
        Set Location  to 6 6
        Set pbAutoOrdering to False

        Object oPATIENT_PATIENT_ is a cDbCJGridColumn
            Entry_Item PATIENT.PATIENT#
            Set piWidth to 106
            Set psCaption to "Patient #"
            Set peHeaderAlignment to xtpAlignmentLeft 
        End_Object

        Object oPATIENT_LAST_NAME is a cDbCJGridColumn
            Entry_Item PATIENT.LAST_NAME
            Set piWidth to 130
            Set psCaption to "Last Name"
        End_Object

        Object oPATIENT_FIRST_NAME is a cDbCJGridColumn
            Entry_Item PATIENT.FIRST_NAME
            Set piWidth to 131
            Set psCaption to "First Name"
        End_Object

        Object oPATIENT_GENDER is a cDbCJGridColumn
            Entry_Item PATIENT.GENDER
            Set piWidth to 75
            Set psCaption to "Gender"
        End_Object

        Object oPATIENT_DOB is a cDbCJGridColumn
            Entry_Item PATIENT.DOB
            Set piWidth to 132
            Set psCaption to "DOB"
        End_Object
    End_Object

    Object oOK_bn is a Button
        Set Label     to "&OK"
        Set Location to 135 231
        Set peAnchors to anBottomRight

        Procedure OnClick
            Send Ok of oSelList
        End_Procedure
    End_Object

    Object oCancel_bn is a Button
        Set Label     to "&Cancel"
        Set Location to 135 285
        Set peAnchors to anBottomRight

        Procedure OnClick
            Send Cancel of oSelList
        End_Procedure
    End_Object

    Object oSearch_bn is a Button
        Set Label     to "&Search..."
        Set Location to 135 339
        Set peAnchors to anBottomRight

        Procedure OnClick
            Send Search of oSelList
        End_Procedure
    End_Object

    On_Key Key_Alt+Key_O Send KeyAction of oOk_bn
    On_Key Key_Alt+Key_C Send KeyAction of oCancel_bn
    On_Key Key_Alt+Key_S Send KeyAction of oSearch_bn

End_Object

